import 'dart:typed_data';

import 'package:flutter/material.dart';

import 'dart:ui' as ui show Gradient, TextBox, lerpDouble;

class PaintPage extends StatelessWidget {
  const PaintPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceAround,
          children: [
            const Icon(Icons.threed_rotation, size: 80),
            CustomPaint(painter: PaperPainter()),
            const Placeholder(
              color: Colors.red,
              strokeWidth: 3,
              fallbackWidth: 100,
              fallbackHeight: 100,
            ),
          ],
        ),
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceAround,
          children: [
            Container(
              margin: const EdgeInsets.symmetric(vertical: 4),
              child: const FlutterLogo(size: 60),
            ),
            const Text('FlutterLogo'),
          ],
        )
      ],
    );
  }

}

class PaperPainter extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    final Paint paint = Paint()
      ..color = Colors.blue
      ..strokeWidth = 2
      ..style = PaintingStyle.stroke;
    canvas.drawCircle(const Offset(0, 0), 40, paint);

  }

  @override
  bool shouldRepaint(covariant CustomPainter oldDelegate) {
    return false;
  }

}
